#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int i = 0, sum = 0, n = 0, ret = 1;
	for (i = 1; i <= 3; i++)
	{
		ret *= i;
		sum += ret;
	}
	printf("%d", sum);

	return 0;
}